"""
代码尝试专用脚本（空壳模板）
- 用于调试、测试新功能或片段
"""

import os
import time

import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import pandas as pd
import scipy.stats
import seaborn as sns
from matplotlib.font_manager import FontProperties
from sklearn.covariance import GraphicalLasso, LedoitWolf
from sklearn.preprocessing import StandardScaler
from src.mgm import (
    add_age_group,
    bootstrap_diff,
    build_network_from_adj,
    compare_edge_structure,
    compare_network_structure,
    draw_multi_year_agegroup_networks,
    draw_multi_year_networks,
    draw_network,
    draw_network_subplot,
    filter_vars,
    get_chinese_name,
    get_network_annotation,
    get_node_metrics,
    plot_density_heatmap,
    plot_happiness_centrality_bar,
    preprocess_data,
    run_ledoitwolf,
    run_mgm,
    save_and_show_fig,
    test_edge_weight_diff,
    test_node_centrality_diff,
)

from tqdm import tqdm

if __name__ == "__main__":
    print("=" * 40)
    start_time_str = time.strftime("%Y-%m-%d %H:%M:%S")
    start_time = time.time()
    print(f"⏱ 代码尝试开始 {start_time_str}")
    print("=" * 40)

    # 在此处编写你的测试代码
    for _ in tqdm(range(5), colour="yellow"):
        time.sleep(0.2)

    end_time_str = time.strftime("%Y-%m-%d %H:%M:%S")
    end_time = time.time()
    print("=" * 40)
    print(f"⌛️ 代码尝试结束 {end_time_str}")
    duration = end_time - start_time
    print(f"总耗时：{int(duration)} 秒（{duration/60:.2f} 分钟）")
    print("=" * 40)

